package com.likersai.opon.controller;

import com.likersai.opon.pojo.entity.OponUser;
import com.likersai.opon.service.OponUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 接口测试类
 *
 * @author sun.ye
 * @since 2020-11-23 15:27
 */
@RestController
@RequestMapping(value = "/service")
@Api("测试用的相关api")
public class ServiceTestController {


    @Autowired
    OponUserService oponUserService;

    @PostMapping(value = "/save" , produces="application/json;charset=UTF-8")
    @ApiOperation(value = "商品修改", notes = "修改数据库中某个的商品信息")
    @ApiImplicitParam(name = "id", value = "商品ID",  paramType = "path", required = true, dataType =  "integer")
    public Map<String, String> test(HttpServletRequest request,  @RequestBody Map param){
        param.put("test","test");
        oponUserService.queryOponUser(new OponUser());
        return param;
    }


}

